package com.xbjtech.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xbjtech.mapper.RegionMapper;
import com.xbjtech.model.Region;
import com.xbjtech.model.RegionExample;
import com.xbjtech.model.RegionExample.Criteria;

@Service("regionService")
public class RegionServiceImpl implements RegionService {

	@Autowired
	RegionMapper regionMapper;
	
	@Override
	public List<Region> selectRegionsByParId(Long parid) {
		RegionExample regionExample = new RegionExample();
		Criteria criteria = regionExample.createCriteria();
		criteria.andParidEqualTo(parid);
		return regionMapper.selectByExample(regionExample);
	}

}
